/**
 * Project of Vehicle Routing Problem with Time Windows implements 
 * some of well-known algorithms for solving VRPTW and presents new 
 * one.
 *
 * @author Michal Drobny  
 */

package logic.restrictionAdapter;

import java.util.ArrayList;
import java.util.List;

import logic.restriction.Restriction;

/**
 * Represents the abstract Restriction adapter for managing restrictions for
 * current VRP.
 * 
 * @author Michal Drobny
 * @date 21.10.2014
 */
public abstract class RestrictionAdapter extends Restriction {

	protected final List<Restriction> restrictions;

	/**
	 * Constructor.
	 */
	public RestrictionAdapter() {
		this.restrictions = new ArrayList<Restriction>();
	}
	
	/**
	 * Constructor.
	 * 
	 * @param restrictions
	 *            The restrictions
	 */
	public RestrictionAdapter(List<Restriction> restrictions) {
		if (restrictions == null)
			this.restrictions = new ArrayList<Restriction>();
		else
			this.restrictions = restrictions;
	}

	/**
	 * Getter for restrictions.
	 * 
	 * @return The restrictions
	 */
	public List<Restriction> getRestrictions() {
		return restrictions;
	}
}